package net.coding.li709.materialrefresher.utils;

import org.spongepowered.api.Sponge;
import org.spongepowered.api.entity.Entity;
import org.spongepowered.api.entity.EntityType;
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.World;

import java.util.Optional;

public class EntityUtils {



    public static Entity createEntity(String entityId,Location<World> loc){
        Optional<EntityType> custom = Sponge.getRegistry().getType(EntityType.class, entityId);
        return loc.getExtent().createEntity(custom.get(), loc.getPosition());
    }


}
